﻿@using Giant.Core;
@using Giant.Core.Infrastructure
@using Giant.Web.Framework.Themes
@using Giant.Web.Framework.UI
@{  
    var supportRtl = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Rtl;
    var themeName = EngineContext.Current.Resolve<IThemeContext>().WorkingThemeName;


    //add browser specific CSS files
    var browser = Request.Browser;
    if (browser.Browser == "IE" && browser.MajorVersion == 8)
    {
        Html.AppendCssFileParts(string.Format("~/Themes/{0}/Content/css/ie8.css", themeName));
    }
    //add main CSS file
    if (supportRtl)
    {
        Html.AppendCssFileParts(string.Format("~/Themes/{0}/Content/css/styles.rtl.css", themeName));
    }
    else
    {
        Html.AppendCssFileParts(string.Format("~/Themes/{0}/Content/css/styles.css", themeName));
    }

    //Bootstrap css
    Html.AppendCssFileParts(string.Format("~/Themes/{0}/Content/css/bootstrap.css", themeName));

    //add font-awesome css file
    Html.AppendCssFileParts(string.Format("~/Themes/{0}/Content/css/animate-custom.css", themeName));
    Html.AppendCssFileParts(string.Format("~/Themes/{0}/Content/css/font-awesome.min.css", themeName));
    //add jQuery UI css file
    Html.AppendCssFileParts("~/Content/jquery-ui-themes/smoothness/jquery-ui-1.10.3.custom.min.css");

    Html.AppendScriptParts("~/Scripts/modernizr.custom.js");
    Html.AddScriptParts(ResourceLocation.Foot, "~/Scripts/bootstrap.min.js");
    Html.AddScriptParts(ResourceLocation.Foot, "~/Scripts/jquery.easing.1.3.js");
    Html.AddScriptParts(ResourceLocation.Foot, "~/Scripts/smoothscroll.js");
    Html.AddScriptParts(ResourceLocation.Foot, "~/Scripts/jquery-func.js");

    if (browser.Browser == "IE" && browser.MajorVersion == 8)
    {
        Html.AddScriptParts("~/Scripts/selectivizr.min.js");
        Html.AddScriptParts("~/Scripts/respond.min.js");
    }
}